package com.sushi.repository.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

@Getter
@Setter
@ToString
public class BaseEntity<T> extends Model<BaseEntity<T>> implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 创建者 Id
     */
    @TableField(value = "creator_id", fill = FieldFill.INSERT)
    private String creatorId;

    /**
     * 创建者 名称
     */
    @TableField(value = "creator_name", fill = FieldFill.INSERT)
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField("gmt_create_time")
    private LocalDateTime gmtCreateTime;

    /**
     * 修改者 Id
     */
    @TableField(value = "modifier_id", fill = FieldFill.INSERT_UPDATE)
    private String modifierId;

    /**
     * 修改者 名称
     */
    @TableField(value = "modifier_name", fill = FieldFill.INSERT_UPDATE)
    private String modifierName;

    /**
     * 修改时间
     */
    @TableField("gmt_modify_time")
    private LocalDateTime gmtModifyTime;

    /**
     * 删除标识 1 已删除 0 未删除
     */
    @TableField("deleted")
    @TableLogic
    private Long deleted;


}
